import http from '@/utils/request'
/**
* 用户登录
* @returns
*/
export async function login(data) {
  return await http.login("/api/user/login", data)
}

/**
* 获取用户信息和权限信息
* @returns
*/
export async function getInfo() {
  return await http.get("/api/sysUser/getInfo")
}

/**
* 退出登录
* @returns
*/
export async function logout(param) {
  return await http.post("/api/sysUser/loginOut", param);
}

/**
* 获取菜单数据
*/
export async function getMenuList(){
  return await http.get("/api/sysUser/getMenuList");
}


export default {
  async getUserList(param) {
    return await http.get("/api/user/list", param);
  },

  async updateUser(params) {
    return await http.put("/api/user/update", params);
  },
  //添加
  async addUser(params) {
    return await http.post("/api/user/add", params);
  },
  //删除
  async deleteById(params) {
    return await http.delete("/api/user/delete", params);
    }
}